/**
 * Created by Administrator on 2017/4/23.
 */
!(function($){
    var service = {
        init:function(){
            this.getServices();
            loadNav();
        },
        getServices:function(){
            $.ajax({
                url:API_URL+GET_SERVICES_URL,
                type:'post',
                dataType:'jsonp',
                success:function(data){
                    var arr = data.result;
                    if(data.ok==true){
                        if(arr.length>0){
                            var tpl = template('services_tpl',data);
                            $('.bm_service').html(tpl);
                        }
                    }else{
                        $.alert(data.msg);
                    }

                },
                error:function(data){
                    $.alert(data.msg);
                }
            })
        }
    };
    $(function(){
        service.init();
    });

})(Zepto);